package xiaohongshu

import (
	"github.com/gin-gonic/gin"
	"marketing-server/middleware"
)

type XhsPreAuthCodeRouter struct{}

// InitXhsPreAuthCodeRouter 初始化 xhsPreAuthCode表 路由信息
func (s *XhsPreAuthCodeRouter) InitXhsPreAuthCodeRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	xhsPreAuthCodeRouter := Router.Group("xhsPreAuthCode").Use(middleware.OperationRecord())
	xhsPreAuthCodeRouterWithoutRecord := Router.Group("xhsPreAuthCode")
	xhsPreAuthCodeRouterWithoutAuth := PublicRouter.Group("xhsPreAuthCode")
	{
		xhsPreAuthCodeRouter.POST("createXhsPreAuthCode", xhsPreAuthCodeApi.CreateXhsPreAuthCode)             // 新建xhsPreAuthCode表
		xhsPreAuthCodeRouter.DELETE("deleteXhsPreAuthCode", xhsPreAuthCodeApi.DeleteXhsPreAuthCode)           // 删除xhsPreAuthCode表
		xhsPreAuthCodeRouter.DELETE("deleteXhsPreAuthCodeByIds", xhsPreAuthCodeApi.DeleteXhsPreAuthCodeByIds) // 批量删除xhsPreAuthCode表
		xhsPreAuthCodeRouter.PUT("updateXhsPreAuthCode", xhsPreAuthCodeApi.UpdateXhsPreAuthCode)              // 更新xhsPreAuthCode表
	}
	{
		xhsPreAuthCodeRouterWithoutRecord.GET("findXhsPreAuthCode", xhsPreAuthCodeApi.FindXhsPreAuthCode)       // 根据ID获取xhsPreAuthCode表
		xhsPreAuthCodeRouterWithoutRecord.GET("getXhsPreAuthCodeList", xhsPreAuthCodeApi.GetXhsPreAuthCodeList) // 获取xhsPreAuthCode表列表
	}
	{
		xhsPreAuthCodeRouterWithoutAuth.GET("getXhsPreAuthCodePublic", xhsPreAuthCodeApi.GetXhsPreAuthCodePublic) // xhsPreAuthCode表开放接口
	}
}
